package com.mti.epivisitemobile.model
{
	import com.mti.epivisite.common.event.EpivisiteEvent;
	
	import mx.collections.ArrayCollection;
	
	import org.puremvc.as3.patterns.proxy.Proxy;

	public class EventListProxyMock extends EventListProxyBase
	{
		public function EventListProxyMock()
		{
			super();
		}
		
		private var _events:ArrayCollection = null;
		public override function get events():ArrayCollection
		{
			return _events;
		}
		
		public override function getEventList():void
		{
			_events = new ArrayCollection();
			addEvent("Epitanime", "Convention Epitanime", new Date(2012, 6, 25), new Date(2012, 6, 30));
			addEvent("Visite EPITA", "Visite des locaux de l'EPITA", new Date(2012, 3, 20), new Date(2012, 3, 20));
			addEvent("JPO Epita KB", "Journee portes ouvertes de l'EPITA au Kremlin Bicetre", new Date(2012, 9, 25), new Date(2012, 9, 27));
			addEvent("JPO Epita VJ", "Journee portes ouvertes de l'EPITA a Villejuif", new Date(2012, 11, 12), new Date(2012, 11, 13));
			
			sendNotification(LOAD_SUCCESS);
		}
		
		private function addEvent(name:String, description:String, startDate:Date, endDate:Date):void
		{
			var eventObject:EpivisiteEvent = new EpivisiteEvent();
			eventObject.name = name;
			eventObject.description = description;
			eventObject.startDate = startDate;
			eventObject.endDate = endDate;
			_events.addItem(eventObject);
		}
	}
}